package com.exam.mapper;

import com.exam.entity.ClassScore;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface ClassScoreRepository extends JpaRepository<ClassScore, Integer> {

    // 根据班级ID分页查询成绩记录
    Page<ClassScore> findByClassId(Integer classId, Pageable pageable);

    // 根据班级ID和课程名查询成绩记录
    Page<ClassScore> findByClassIdAndCourseName(Integer classId, String courseName, Pageable pageable);
}